package zMainLoader;

import interesadosApp.Core.InteresadosAppCore;

import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import javax.swing.JFrame;

import requisitosApp.Core.RequisitosAppCore;
import sMySQLappTemplate.GUI.MyButton;
import sMySQLappTemplate.GUI.MyRoundBorder;
import solicitudesApp.Core.ApplicationsAppCore;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class AppSelect extends JFrame
{
	private JFrame myInitWindow;
	
	public AppSelect()
	{
		myInitWindow = this;
		
		this.setSize(280, 117);
		this.setResizable(false);
		
		this.setLocationRelativeTo(getRootPane());
		
		this.setTitle("Seleccione una Aplicacion");
		
		this.rootPane.setBorder(new MyRoundBorder(8));
		this.getContentPane().setLayout(new FlowLayout());
		
		MyButton b1 = new MyButton("/images/GestionDeRequisitos.png", "Gestion de Requisitos");
		b1.addMouseListener(new MouseAdapter() {
			public void mouseClicked(MouseEvent e) {
			
				if (e.getComponent().isEnabled())
				{
					RequisitosAppCore requisitosAppCore = new RequisitosAppCore();
					myInitWindow.dispose();
				}
			}
		});
		this.getContentPane().add(b1);
		b1.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent evt) {
				b1ActionPerformed(evt);
			}
		});

		MyButton b2 = new MyButton("/images/GestionDeSolicitudes.png", "Gestion de Solicitudes");
		b2.addMouseListener(new MouseAdapter() 
		{
	         public void mouseClicked(MouseEvent e) {
	        	 if (e.getComponent().isEnabled())
	        	 {
	        		 ApplicationsAppCore appCore = new ApplicationsAppCore();
	        		 myInitWindow.dispose();
	        	 }
	         }
		});
		this.getContentPane().add(b2);
		
		MyButton b3 = new MyButton("/images/GestionDeUsuarios.png", "Gestion de Interesados");
		b3.addMouseListener(new MouseAdapter() 
		{
	         public void mouseClicked(MouseEvent e) {
	        	 if (e.getComponent().isEnabled())
	        	 {	        		 
	        	 	 InteresadosAppCore appCore = new InteresadosAppCore();
	        	 	 myInitWindow.dispose();
	        	 }
	         }
		});
		this.getContentPane().add(b3);		
	}
	
	private void b1ActionPerformed(ActionEvent evt) {
		System.out.println("b1.actionPerformed, event="+evt);
		//TODO add your code for b1.actionPerformed
	}
}
